﻿using System;
using Scrum.Net.Utilities;

namespace Scrum.Net
{
    public class ServiceManager : ObservableObject, IServiceManager
    {
        private bool _isProjectLoaded;

        public ServiceManager()
        {
            Messenger = new Messenger();
        }

        public bool IsProjectLoaded
        {
            get { return _isProjectLoaded; }
            set 
            { 
                _isProjectLoaded = value;
                RaisePropertyChanged("IsProjectLoaded");
                
                //if (Messenger != null) Messenger.NotifyColleagues("ChangeProject", IsProjectLoaded);
            }
        }

        public Messenger Messenger { get; set; }
    }

    public interface IServiceManager
    {
        bool IsProjectLoaded { get; set; }
        Messenger Messenger { get; set; }
    }
}
